import { memo } from 'react';
import type { FC } from 'react';
import { Typography, Input } from 'antd';
import { QuestionInputPropsType, QuestionInputDefaultProps } from './Interface';

const { Paragraph } = Typography;

const QuestionInput: FC<QuestionInputPropsType> = (
  props: QuestionInputPropsType
) => {
  const { title, placeholder } = { ...QuestionInputDefaultProps, ...props };
  return (
    <div>
      <Paragraph strong>{title}</Paragraph>
      <div>
        <Input placeholder={placeholder} />
      </div>
    </div>
  );
};

export default memo(QuestionInput);
